package com.ny.service.impl;

import com.ny.entity.Classrooms;
import com.ny.mapper.ClassRoomMapper;

import com.ny.service.ClassroomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ClassroomServiceImpl implements ClassroomService {
    @Autowired
    private ClassRoomMapper classroomMapper;

    @Override
    public List<Classrooms> findAllClassrooms() {
        return classroomMapper.findAllClassrooms();
    }

    @Override
    public Classrooms findClassroomById(int id) {
        return classroomMapper.findClassroomById(id);
    }

    @Override
    public void updateClassroomStatusById(int classroomId, String status) {
        classroomMapper.updateClassroomStatusById(classroomId, status);
    }
    @Override
    public List<Classrooms> searchClassrooms(String classroomName, String capacity, String status, String location, String description) {
        return classroomMapper.searchClassrooms(classroomName, capacity, status, location, description);
    }
}
